import api from '@/axios/api';
import { max, required } from "@/utils/ruleUtil";
import { BaseFormItemObjType, BaseTableColumnObjType, BaseFormRuleObjType } from '@/components/base/common';

export class ${className} {
${baseFields}}

export const base = {
  idKey: '${idName}',
  permission: '${permission}',
  baseApi: api.${api},
}

export const buildPer = (p: string) => '${permission}:' + p;

export const baseRules: BaseFormRuleObjType<${className}> = {
${baseFormRules}}

export const baseColumns: BaseTableColumnObjType<${className}> = {
${baseColumns}}

export const baseFormItems: BaseFormItemObjType<${className}> = {
${formItems}}